package com.kbbywyclient.ui.contarct;

import com.kbbywyclient.data.entity.Banner;
import com.kbbywyclient.data.entity.HotRec;
import com.kbbywyclient.data.entity.IndexData;
import com.kbbywyclient.data.model.base.BaseModel;
import com.kbbywyclient.ui.contarct.base.IBaseView;

import java.util.List;

/**
 * Created by Jiangzx on 2017/8/17 10:44.
 */

public class IndexContract {
    public interface View extends IBaseView{
        void finishRefresh();
        void onIndexDataSuccess(IndexData data);
        void onIndexDataFailure();

        void onBannerSuccess(List<Banner.Bean> list);
        void hideBanner();

        void onRedPacketSuccess(List<Banner.Bean> list);

        void setListUi(List<HotRec> data,boolean canLoadMore);
        void loadListEmpty();

        void loadSucUpdate(BaseModel baseModel);

    }

    public interface Presenter{
        /**
         * 获取首页tab数据[余额、办卡分享、抢单赚钱]
         * @param saleId 业务员id
         */
        void getIndexData(String saleId);

        /**
         * 获取轮播图
         * @param code code
         */
        void getBannerData(String code);

        /**
         * 获取红包数据
         * @param code bannerCode
         */
        void getRedPacket(String code);

        /**
         * 获取热门推荐列表
         * @param saleId 业务员id
         * @param page 分页用的页码
         */
        void getHotRecList(String saleId,int page);

        void clearList();

        /**
         * 拆红包更新接口
         * @param saleID
         */
        void updateSaleBalance(String saleID);
    }
}
